package com.baosight.risk.mapper.zbaa;

import com.baosight.risk.base.mapper.BaseMapper;
import com.baosight.risk.service.zbaa.entity.ZbaaTarget;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ZbaaTargetMapper extends BaseMapper<ZbaaTarget> {

    ZbaaTarget getTargetByTargetNo(@Param("targetNo") String targetNo);

    List<ZbaaTarget> getTargetList(@Param("target") ZbaaTarget target);

    /**
     * 根据数据类型查找授权数据
     *
     * @return
     */
    List<ZbaaTarget> getTargetAuthByType(@Param("target") ZbaaTarget target);

    List<ZbaaTarget> getTargetByUser(@Param("userCode") String userCode, @Param("targetName") String targetName);

    /**
     * 根据数据类型查找数据
     *
     * @return
     */
    List<ZbaaTarget> getTargetByType(@Param("target") ZbaaTarget target);

    List<ZbaaTarget> getTargetByIds(@Param("ids") List<String> ids);

    List<ZbaaTarget> getTargetListByTagertTypes(@Param("target") ZbaaTarget target, @Param("types") List<String> types);

    Integer updateStatus(@Param("ids") List<String> ids, @Param("status") String status, @Param("statusName") String statusName);

    //找到需要计算的指标
    List<ZbaaTarget> getTargetByJiSuan();

    List<ZbaaTarget> getTargetListByTagertTypesAndUserComp(@Param("target") ZbaaTarget target, @Param("types") List<String> ddCodeList, @Param("compCode") String compCode);

    List<ZbaaTarget> getTargetListByRiskSource(String riskSource);

    List<ZbaaTarget> getRiskWarningStatusTargetList(@Param("target") ZbaaTarget target);
}